// 抽象类 只能被继承不能用new实例化

export {}

abstract class Animal {
  eat (food: string) {
    console.log(`咕噜咕噜：${food}`)
  }
  abstract run (distance: number): void
}

class Dog extends Animal {
  run(distance: number): void {
    console.log(`四脚爬行： ${distance}`)
  }
}

const d = new Dog()
d.eat('吨吨吨')
d.run(100)